<?php
/**
 * Unfuddle Custom Field Value Model
 *
 * @package     Unfuddle
 * @subpackage  Data Models
 * @author      Luke Visinoni <luke.visinoni@gmail.com>
 * @copyright   (c) 2010 Luke Visinoni <luke.visinoni@gmail.com>
 * @version     $Id: CustomFieldValue.php 29 2011-05-09 07:08:53Z luke.visinoni $
 */
class Unfuddle_Model_CustomFieldValue extends Unfuddle_Model_Abstract {

    /**
     * CustomFieldValues may be assigned to any one of the three custom ticket fields within the project
     */
    const URI_CUSTOM_FIELD_VALUES = '/projects/%d/custom_field_values';
    
    /**
     * Returns a particular custom field for a particular project
     */
    const URI_CUSTOM_FIELD_VALUE_BY_ID = '/projects/%d/custom_field_values/%d';
    
    /**
     * @var string Model name
     * @todo Unfuddle_Model_Abstract::nameToClass() doesn't support this type of name yet
     */
    protected $_name = 'custom-field-value';
    
    /**
     * @var array Model fields
     */
    protected $_fields = array (
        'created-at' => array('type' => 'datetime', 'required' => false, 'read-only' => true),
        'field-number' => array('type' => 'integer', 'required' => false, 'read-only' => false),
        'id' => array('type' => 'integer', 'required' => false, 'read-only' => true),
        'project-id' => array('type' => 'integer', 'required' => false, 'read-only' => true),
        'updated-at' => array('type' => 'datetime', 'required' => false, 'read-only' => true),
        'value' => array('type' => 'text', 'required' => false, 'read-only' => false),
    );

}
